import java.util.Arrays;
import java.util.Stack;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: lenovo
 * Date: 2022-08-15
 * Time: 8:35
 */
public class Test {
    public static void main(String[] args) {
        MyStack stack = new MyStack();
        stack.push(1);
        stack.push(2);
        stack.push(3);
        stack.push(4);
       stack.display();
        int tmp = stack.peek();
        System.out.println(tmp);
        stack.pop();
       stack.display();
       stack.pop();
       stack.pop();
       stack.pop();
       stack.display();
        System.out.println(stack.isEmpty());

    }
    public static void main1(String[] args) {
        Stack<Integer> stack = new Stack<>();
        stack.push(1);
        stack.push(2);
        stack.push(3);
        System.out.println(stack);

    }
}
